SELECTION-SCREEN BEGIN OF BLOCK BK1 WITH FRAME TITLE TEXT-T01.
SELECT-OPTIONS S_DATE FOR MSEG-CPUDT_MKPT. "日历模式
PARAMETERS P_OUTIN AS LISTBOX VISIBLE LENGTH 8 OBLIGATORY DEFAULT '1'.
SELECT-OPTIONS S_LOGRT FOR ZMMT00040-LGORT.
SELECT-OPTIONS S_LIFNR FOR MSEG-LIFNR.
SELECT-OPTIONS S_ZHWDZ FOR ZMMT00040-ZHWDZ.
SELECT-OPTIONS S_MATNR FOR MSEG-MATNR.
SELECT-OPTIONS S_ZSQBM FOR MSEG-ZSQBM.
SELECT-OPTIONS S_LGORT1 FOR MSEG-LGORT.
SELECT-OPTIONS S_EKGRP FOR ZMMT00091-EKGRP.
SELECTION-SCREEN END OF BLOCK BK1.

FORM S_SET_SELECTION_LOW.
    CALL FUNCTION 'ISU_EDM_DATE_CONTROL_POPUP'
    EXPORTING
    X_DATE = SY-DATUM
    IMPORTING
    Y_DATE_SELECTED = I_DATA.

S_DATE-LOW = I_DATE.
ENDFORM.

FORM S_SET_SELECTION_HIGH.
    CALL FUNCTION 'ISU_EDM_DATE_CONTROL_POPUP'
    EXPORTING
    X_DATE = SY-DATUM
    IMPORTING
    Y_DATE_SELECTED = I_DATA.

S_DATE-HIGH = I_DATE.
ENDFORM.

FORM P_SET_SELECTION2.
    TYPES: BEGIN OF TY,
            COL1 TYPE CHAR1,
            COL2 TYPE CHAR2,
            END OF TY.

    DATA STAB TYPE TABLE OF TY.
    STAB = VALUE #( 
        ( COL1 = '1' COL2 = '出库' )
        ( COL1 = '2' COL2 = '入库' )
     ).

     CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
     EXPORTING
     RETFIELD = 'COL1'
     DYNPPROG = SY-REPID
     DYNPNR = SY-DYNNR
     DYNPROFIELD = 'COL1'
     VALUE_ORG = 'S'
     CALLBACK_PROGRAM = SY-REPID
     TABLES
     VALUE_TAB = STAB
     EXCEPTIONS
     PARAMETER_ERROR = 1
     NO_VALUES_FOUND = 2
     OTHERS = 3.
     IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
     ENDIF.
ENDFORM.